package smallChanges.statements;

import java.util.Set;

import net.sourceforge.pmd.ast.SimpleJavaNode;

/**
 * TODO document this class
 * This class exists so that all statements that have visibility and modifiers 
 * (public, static, final, etc) can be treated the same way by utility methods.
 * This interface doesn't really define a new "type" so much as it's useful.
 * @author jspacco
 *
 */
public interface IAccessNode
{

    public abstract void setVisibility(SCVisibility visibility);

    /**
     * @return the visibility
     */
    public abstract SCVisibility getVisibility();
    
    public abstract SCModifiers getModifiers();
    
    public abstract int getBeginLine();
    public abstract int getBeginColumn();
    public abstract void setBeginLine(int beginLine);
    public abstract void setBeginColumn(int beginColumn);
    public abstract void setTokensFromRange();

    public abstract void setModifiers(SCModifiers modifiers);
    
    /**
     * Expand the collection of tokens in range by one token.  Return
     * the String image of this token.
     * @return The String image of the token we added to the collection of
     * tokens in the statement's range.
     */
    public abstract String expandByOnePrecedingToken();
    
    public abstract boolean expandByOnePrecedingTokenConditionally(String image);
    
    public abstract boolean expandByOnePrecedingTokenConditionally(Set<String> set);
    
    public abstract void setCoordinatesFromNode(SimpleJavaNode node);
    
    public abstract void setBeginCoordsFromNode(SimpleJavaNode node);

}